﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <h1>传递和接收参数需要2次 
        <br />
        传递:<span style="color: red">encodeURI(encodeURI(str))</span>
        <br />
        接收:<span style="color: red">decodeURI(decodeURI(str))</span>

    </h1>
</body>
</html>
<script>
    //传递
    var v = "我是汉字,需要传到其他页面!";
    v = encodeURI(encodeURI(v));
    var url = "xxx.html?args=" + v;

    //接收
    var args = GetQueryString("args");
    args = decodeURI(decodeURI(args));

    function GetQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    };
</script>
